package org.jeecg.modules.nc.mapper;

import java.math.BigDecimal;
import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.nc.entity.NcBdTaxcode;

/**
 * @Description: nc_bd_taxcode
 * @Author: qixin-boot
 * @Date:   2021-12-19
 * @Version: V1.0
 */
public interface NcBdTaxcodeMapper extends BaseMapper<NcBdTaxcode> {

    /**
    * @Description 通过税率值查询对应的税码
    * @author  wujinbiao
    * @date 2022/2/18
    * @param taxRate
    * @return java.lang.String
    */
    @Select("select id from nc_bd_taxcode where dr = 0 and enablestate = 2 and taxrate = #{taxRate}")
    String getTaxId(@Param("taxRate") BigDecimal taxRate);

}
